/**
 * Description: 函数sscanf() 的使用
 * File: func_sscanf.c |Time: 2021-04-07 21:51
 */

#include <stdio.h>

int main(int argc, char *argv[])
{
    char str[] = "china women 29";
    char country[20];
    char sex[20];
    int age;
    
    sscanf(str, "%s %s %d", country, sex, &age);

    printf("country = %s\n", country);
    printf("sex = %s\n", sex);
    printf("age = %d\n", age);

    return 0;
}

